package com.shop.zkmall.app.controller.a;

import com.shop.zkmall.app.domain.BankParam;
import com.shop.zkmall.app.domain.req.AddCoupon;
import com.shop.zkmall.app.service.a.ICereBuyerCouponService;
import com.shop.zkmall.app.utils.R;
import com.shop.zkmall.commons.result.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("coupon")
@RequiredArgsConstructor
@Tag(name = "优惠券模块", description = "优惠券模块")
public class BuyerCouponController {


     private final ICereBuyerCouponService iCereBuyerCouponService;


    /**R<String>
     * 新增优惠券
     */
    @RequestMapping(value = "addCoupon")
    @Operation(summary = "新增优惠券")
    public R<String> addCoupon(@Validated @RequestBody AddCoupon addCoupon) {
        return iCereBuyerCouponService.addCoupon(addCoupon);
    }

}
